package com.Java.train.business.entity.DTO;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.sql.Time;
import java.util.Date;

@Getter
@Setter
@Accessors(chain = true)
@TableName("daily_train")
@ApiModel(value = "DailyTrain对象", description = "每日车次")
public class DailyTrainDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("日期")
    @TableField("date")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date date;

    @ApiModelProperty("车次编号")
    @TableField("code")
    private String code;

    @ApiModelProperty("车次类型|枚举[TrainTypeEnum]")
    @TableField("type")
    private String type;

    @ApiModelProperty("始发站")
    @TableField("start")
    private String start;

    @ApiModelProperty("始发站拼音")
    @TableField("start_pinyin")
    private String startPinyin;

    @ApiModelProperty("出发时间")
    @TableField("start_time")
    private Time startTime;

    @ApiModelProperty("终点站")
    @TableField("end")
    private String end;

    @ApiModelProperty("终点站拼音")
    @TableField("end_pinyin")
    private String endPinyin;

    @ApiModelProperty("到站时间")
    @TableField("end_time")
    private Time endTime;

    @ApiModelProperty("新增时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
}
